package com.atguigu.crowd.config;


import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.reactive.CorsWebFilter;
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;

@Configuration
public class GateWayConfig {
//    @Bean
////    public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
////        RouteLocatorBuilder.Builder routes = builder.routes();
////
////        // 分析：访问路径为/guinei,就会自动跳转到uri地址上，也就是访文http://localhost:9527/guonei,就会自动跳转过去
////        routes.route("gateway_auth", r -> r.path("/**")
////                .uri("http://localhost:4000/")).build();
////        return routes.build();
////    }
}
